package com.zwh.rocketmq.demo.delay;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author zwh
 * @date 2024-1-18 18:04
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = "TEST_DELAY_TOPIC", consumerGroup = "Group1")
public class DelayMessageConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        log.info("接收到延时消息,msg={}", message);
    }
}
